 /*
 * @name: 0元购自营商品
 * @Author: along
 * @Date: 2020-06-18
 * @Last Modified by: along
 * @Last Modified time: 2020-06-18
 */
<template>
    <div class="container goodsZeroSelf">
        <!-- header -->
        <div class="header-nav">
            <div class="header-left">
                <div class="header-new-box">
                    <p class="header-new-box-title">商品名称:</p>
                    <el-input
                        v-model="filterHead.shop_name"
                        placeholder="请输入内容"
                        size="small"
                        clearable
                        suffix-icon="el-icon-search"
                        @change="getTableData(1)"
                        @keyup.native.enter="getTableData(1)"
                    />
                </div>
                <div class="header-new-box">
                    <p class="header-new-box-title">店铺名称:</p>
                    <el-input
                        v-model="filterHead.goods_name"
                        placeholder="请输入内容"
                        size="small"
                        clearable
                        suffix-icon="el-icon-search"
                        @change="getTableData(1)"
                        @keyup.native.enter="getTableData(1)"
                    />
                </div>
                <div class="header-new-box">
                    <p class="header-new-box-title">公司名称:</p>
                    <el-input
                        v-model="filterHead.company_name"
                        placeholder="请输入内容"
                        size="small"
                        clearable
                        suffix-icon="el-icon-search"
                        @change="getTableData(1)"
                        @keyup.native.enter="getTableData(1)"
                    />
                </div>
                <div class="header-new-box">
                    <p class="header-new-box-title">审核状态:</p>
                    <el-select
                        v-model="filterHead.shop_status"
                        clearable
                        filterable
                        placeholder="请选择"
                        size="small"
                        @change="getTableData(1)"
                    >
                        <el-option
                            v-for="item in examList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                </div>
                <div class="header-new-box">
                    <p class="header-new-box-title">显示状态:</p>
                    <el-select
                        v-model="filterHead.show_status"
                        clearable
                        filterable
                        placeholder="请选择"
                        size="small"
                        @change="getTableData(1)"
                    >
                        <el-option
                            v-for="item in showlist"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                </div>
            </div>
        </div>
        <!-- /header -->

        <!-- table -->
        <el-table
            :data="tableData"
            height="100%"
            style="width: 100%;"
            border
            ref="goodsZeroSelf"
            @sort-change="handleSortChanged"
            @select="fnSelect"
            @select-all="fnSelectAllTop"
            @selection-change="handleSelectionChange"
        >
            <el-table-column
                type="selection"
                width="40"
                fixed="left"
            />
            <el-table-column
                prop="goods_title"
                label="商品名称"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
            />
            <el-table-column
                prop="goods_cover"
                label="商品缩略图"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
                :width="100"
            >
                <template slot-scope="scope">
                    <img
                        :src="scope.row.goods_cover"
                        alt="加载失败"
                        @click="fnShowPreview(scope.row.goods_cover)"
                        style="width:40px;height:40px"
                    >
                </template>
            </el-table-column>
            <el-table-column
                prop="goods_no"
                label="商品编号"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
                :width="160"
            />
            <el-table-column
                prop="shop_title"
                label="店铺名称"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
                :width="140"
            />
            <el-table-column
                prop="buy_limit"
                label="限购次数"
                show-overflow-tooltip
                :formatter="emptyFormatter"
            >
                <template slot-scope="scope">
                    <div class="sort-wrap">
                        {{ scope.row.buy_limit ? scope.row.buy_limit : '--' }}
                        <span class="sort-spliter" />
                        <el-button
                            type="text"
                            class="btn-sort"
                            @click="fnEditLimit(scope.row)"
                        >
                            <i class="el-icon-edit" />
                        </el-button>
                    </div>
                </template>
            </el-table-column>
            <el-table-column
                label="0元购价格"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
                :width="100"
            >
                <template>
                    0元
                </template>
            </el-table-column>
            <el-table-column
                prop="goods_price_origin"
                label="原价"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
            />
            <el-table-column
                prop="goods_stock"
                label="剩余库存"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
            />
            <el-table-column
                prop="goods_sale"
                label="总销量"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
                sortable
                :width="100"
            />
            <el-table-column
                prop="goods_view"
                label="总浏览量"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
                sortable
                :width="100"
            />
            <el-table-column
                prop="create_time"
                label="创建日期"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
                :width="140"
                sortable
            >
                <template slot-scope="scope">
                    {{ scope.row.create_time * 1000 | dateFormatter('yyyy/MM/dd HH:mm') }}
                </template>
            </el-table-column>
            <el-table-column
                prop="audit_status"
                label="审核状态"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
            >
                <template slot-scope="scope">
                    <p v-if="scope.row.audit_status == 1">已通过</p>
                    <p v-if="scope.row.audit_status == -1">未通过</p>
                    <p v-if="scope.row.audit_status == 0">待审核</p>
                </template>
            </el-table-column>
            <el-table-column
                prop="exchange_coupon_num"
                label="学生券数量"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
                :width="100"
            >
                <template slot-scope="scope">
                    <p
                        class="cursor-font"
                        @click="fnCheckCoupon(scope.row)"
                    >
                        查看
                    </p>
                </template>
            </el-table-column>
            <el-table-column
                prop="goods_sort_free"
                label="排序"
                sortable
            >
                <template slot-scope="scope">
                    <div class="sort-wrap">
                        {{ scope.row.goods_sort_free }}
                        <span class="sort-spliter" />
                        <el-button
                            type="text"
                            class="btn-sort"
                            @click="fnEditSort(scope.row)"
                        >
                            <i class="el-icon-edit" />
                        </el-button>
                    </div>
                </template>
            </el-table-column>
            <el-table-column
                prop="show_status"
                label="显示状态"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
            >
                <template slot-scope="scope">
                    <el-switch
                        v-model="scope.row.show_status"
                        :active-value="1"
                        :inactive-value="0"
                        @change="fnChangeActive(scope.row)"
                    />
                </template>
            </el-table-column>
            <el-table-column
                label="操作"
                align="center"
                fixed="right"
                :width="180"
            >
                <template slot-scope="scope">
                    <div style="display:flex;flex-wrap:wrap">
                        <el-button
                            type="text"
                            class="curse-add"
                            @click="fnAdopt(scope.row)"
                        >
                            审核通过
                        </el-button>
                        <el-button
                            type="text"
                            class="curse-add"
                            @click="fnNoAdopt(scope.row)"
                        >
                            审核不通过
                        </el-button>
                        <br >
                        <el-button
                            type="text"
                            class="curse-add"
                            @click="fnGohome(scope.row)"
                        >
                            编辑
                        </el-button>
                        <el-button
                            type="text"
                            class="curse-add"
                            @click="fnSetNumber(scope.row)"
                        >
                            设置学生券数量
                        </el-button>
                    </div>
                </template>
            </el-table-column>
        </el-table>
        <!-- /table -->

        <!-- /分页 -->
        <div class="pagination-wrapper clearfix">
            <el-checkbox
                v-model="checkedAll"
                :indeterminate="checkIndeterminate"
                @change="fnChangeChecked"
            >全选</el-checkbox>
            <el-button
                type="text"
                @click="fnAproved()"
                :disabled="multipleSelection.length == 0 ? true : false"
            >批量审核通过</el-button>
            <el-pagination
                background
                layout="total, prev, pager, next"
                :current-page.sync="page.now_page"
                :total="page.total_count"
                :page-size="page.page_size"
                @current-change="getTableData"
            />
        </div>

        <!-- 图片预览 -->
        <img-preview ref="preview" />

        <!-- 设置学生券数量 -->
        <el-dialog
            :title="dialog_flag ? '设置学生券数量' : '查看学生券数量' "
            :visible.sync="dialogVisible"
            width='480px'
            :close-on-click-modal="false"
            center
        >
            <div class="zd-flex">
                <div
                    v-for="(item,index) in list"
                    :key="index"
                    class="zd-flex-wrap"
                >
                    <div class="zd-flex-wrap-list">
                        <el-tooltip
                            :content="content"
                            placement="top-start"
                        >
                            <el-button type="text">
                                <div
                                    v-for="(option,i) in item.spec_list"
                                    :key="i"
                                    class="zd-flex-wrap-name"
                                    @mouseenter="fnGetList(item.spec_list)"
                                >
                                    {{ option.spec_name + ':' + option.spec_value }} {{ (i == 0 && item.spec_list.length == 1) || (i == item.spec_list.length - 1) ? '' : ';' }}
                                </div>
                            </el-button>
                        </el-tooltip>
                    </div>
                    <p class="zd-flex-wrap-money">
                        原价: {{ item.product_price }}元
                    </p>
                    <el-input
                        placeholder="请输入学生券数量"
                        v-model="item.coupon_num"
                        clearable
                        size="small"
                        type="number"
                        style="width:180px"
                        :disabled="item.flag"
                    />
                </div>
            </div>
            <div class="zd-foot">
                <el-button
                    size="small"
                    type="default"
                    style="width:100px"
                    @click="dialogVisible = false"
                >
                    取消
                </el-button>
                <el-button
                    size="small"
                    type="primary"
                    style="width:100px;margin-left:50px"
                    @click="fnConfirm()"
                    v-if="dialog_flag"
                >
                    确定
                </el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
import imgPreview from '@/components/common/img-preview';
import { back } from '@/mixin/back';
export default {
    mixins: [back],
    components: {
        imgPreview
    },
    data () {
        return {
            dialog_flag: false,
            goods_no: '',
            content: '',
            list: [],//学生券数量
            dialogVisible: false,
            checkIndeterminate: false,
            multipleSelection: [],
            checkedAll: false,
            filterHead: {
                shop_name: '',
                shop_status: '',
                goods_name: '',
                company_name: '',
                show_status: ''
            },
            examList: [{value: '',label: '全部'},{value: 1,label: '已通过'},{value: -1,label: '未通过'},{value: 0,label: '待审核'}],
            showlist: [{value: '',label: '全部'},{value: 1,label: '已显示'},{value: 0,label: '已隐藏'}],
            filterData: {
                sort_field: 'asc',
                sort_type: 'desc'
            },
            page: {
                now_page: 1,
                total_count: 0,
                page_size: 0
            },
            tableData: [],
            authResult: {}
        };
    },
    filters: {},
    computed: {},
    watch: {},
    created () {},
    mounted () {
        this.$store.commit('SET_HEADER', [{ title: "APP后台"},{title: '商城'},{title: '0元购'},{title: '0元购自营商品'}]);
        this.authResult = this.$route.meta.authResult;
        this.getTableData();
        this.openDialog();//运营人员跳转当前页面默认打开审核弹窗
    },
    methods: {
        /**
         * 获取表格数据
         */
        getTableData (page) {
            this.$post('/student/shop_free_self%5Cget_list', {
                page_id: page || this.page.now_page,
                goods_title: this.filterHead.shop_name,
                shop_title: this.filterHead.goods_name,
                company_name: this.filterHead.company_name,
                audit_status: this.filterHead.shop_status,
                show_status: this.filterHead.show_status,
                sort_field: this.filterData.sort_field,
                sort_type: this.filterData.sort_type
            }, resp => {
                if (resp.code == 1) {
                    this.tableData = resp.data.list;
                    this.page.now_page = resp.data.page.now_page;
                    this.page.total_count = resp.data.page.total_count;
                    this.page.page_size = resp.data.page.page_size;
                }
            });
        },

        /**
         * 打开审核弹窗
         */
        openDialog () {
            let query = this.$route.query;

            if(query.goods_no) {
                this.fnSetNumber({
                    goods_no: query.goods_no
                });
            }
        },

        /**
         * 编辑
         */
        fnGohome (row) {
            this.$post('/wei4/hire_user%5Cget_login_session_ticket', {
                hire_no: row.hire_no
            }, resp => {
                if (resp.code == 1) {
                    let url = `${this.$shopBaseUrl}/manage/market/good-edit-zero?no=${row.goods_no}&session_ticket=` + resp.data.session_ticket;

                    // if(window.location.host == 'phaadmin.wxhand.com') {
                    //     url = `http://cms.zsdx.cn/manage/market/good-edit-zero?no=${row.goods_no}&session_ticket=` + resp.data.session_ticket;
                    // }else{
                    //     url = `http://gt.wxhand.com/manage/market/good-edit-zero?no=${row.goods_no}&session_ticket=` + resp.data.session_ticket;
                    // }
                    window.open(url, '_blank');
                } else {
                    this.$message({
                        type: 'warning',
                        message: resp.msg,
                        center: true
                    });
                }
            });
        },

        /**
         * 获取规格文案
         */
        fnGetList (row) {
            let str = '';

            for(let key in row) {
                str += row[key].spec_name + ':' + row[key].spec_value + ';';
            }

            this.content = str;
        },

        /**
         * 确定设置
         */
        fnConfirm () {
            let flag = false;

            this.list.filter(item => {
                if(!Number(item.coupon_num)) {
                    flag = true;
                }
            });

            if(flag) {
                this.$message({
                    type: 'warning',
                    message: '学生券数量不可以为空'
                });
                return;
            }

            this.$post('/student/shop_free_self%5Cset_coupon',{
                goods_no: this.goods_no,
                free_product_json: JSON.stringify(this.list)
            },resp=>{
                if (resp.code == 1) {
                    this.getTableData();
                    this.dialogVisible = !this.dialogVisible;
                    this.$message({
                        type: 'success',
                        message: '设置成功'
                    });
                } else if (resp.code == 0) {
                    this.$message({
                        type: 'warning',
                        message: resp.msg
                    });
                }
            });
        },
        /**
         * 设置学生券数量
         */
        fnSetNumber (row) {
            this.dialog_flag = true;
            this.goods_no = row.goods_no;
            this.$post('/student/shop_free_self%5Cget_free_product_list', {
                goods_no: row.goods_no
            }, resp => {
                if(resp.code == 1) {
                    let list = resp.data;

                    list.filter(item => {
                        if(item.coupon_num == 0) {
                            item.coupon_num = 1;
                        }
                    });

                    this.list = list;
                } else {
                    this.$message({
                        type: 'warning',
                        message: resp.msg
                    });
                }
            });
            this.dialogVisible = !this.dialogVisible;
        },

        /**
         * 查看学生券数量
         */
        fnCheckCoupon (row) {
            this.dialog_flag = false;
            this.goods_no = row.goods_no;
            this.$post('/student/shop_free_self%5Cget_free_product_list', {
                goods_no: row.goods_no
            }, resp => {
                if(resp.code == 1) {
                    let list = resp.data;

                    list.filter(item => {
                        if(item.coupon_num == 0) {
                            item.coupon_num = 1;
                        }
                        item.flag = true;
                    });

                    this.list = list;
                } else {
                    this.$message({
                        type: 'warning',
                        message: resp.msg
                    });
                }
            });
            this.dialogVisible = !this.dialogVisible;
        },

        /**
         * 审核不通过
         */
        fnNoAdopt (row) {
            this.$prompt('请输入审核不通过的理由', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
            }).then(({ value }) => {
                if(value == '') {
                    this.$message({
                        type: 'warning',
                        message: '内容不可以为空'
                    });
                    return;
                }
                this.$post('/student/shop_goods%5Caudit',{
                    action: 'fail',
                    goods_no: row.goods_no,
                    reason: value
                },resp=>{
                    if (resp.code == 1) {
                        this.getTableData();
                        this.$message({
                            type: 'success',
                            message: '操作成功'
                        });
                    } else if (resp.code == 0) {
                        this.$message({
                            type: 'warning',
                            message: resp.msg
                        });
                    }
                });
            });
        },

        /**
         * 审核通过
         */
        fnAdopt (row) {
            this.$post('/student/shop_goods%5Caudit',{
                action: 'pass',
                goods_no: row.goods_no
            },resp=>{
                if (resp.code == 1) {
                    this.getTableData();
                    this.$message({
                        type: 'success',
                        message: '操作成功'
                    });
                } else if (resp.code == 0) {
                    this.$message({
                        type: 'warning',
                        message: resp.msg
                    });
                }
            });
        },

        /**
         * 批量审核通过
         */
        fnAproved () {
            this.multipleSelection.forEach(option => {
                this.$post('/student/shop_goods%5Caudit',{
                    action: 'pass',
                    goods_no: option.goods_no
                },resp=>{
                    if (resp.code == 1) {
                        //
                    }
                });
            });

            setTimeout(()=>{
                this.getTableData();
                this.$message({
                    type: 'success',
                    message: '操作成功'
                });
            },300);
        },

        /**
         * 排序
         */
        fnEditSort (row) {
            this.$prompt('请输入排序号', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                inputPattern: /^([1-9]\d?|[1-9]\d+)$/,
                inputErrorMessage: '排序号格式不正确,请重新输入'
            }).then(({ value }) => {
                this.$post('/student/shop_free_self%5Cmodify',{
                    goods_no: row.goods_no,
                    goods_sort_free: value
                },resp=>{
                    if (resp.code == 1) {
                        this.getTableData();
                        this.$message({
                            type: 'success',
                            message: '操作成功'
                        });
                    } else if (resp.code == 0) {
                        this.$message({
                            type: 'warning',
                            message: resp.msg
                        });
                    }
                });
            });
        },

        /**
         * 修改限购次数
         */
        fnEditLimit (row) {
            this.$prompt('请输入限购次数', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                inputPattern: /^([1-9]\d?|[1-9]\d+)$/,
                inputErrorMessage: '限购次数格式不正确,请重新输入'
            }).then(({ value }) => {
                this.$post('/student/shop_free%5Cmodify',{
                    goods_no: row.goods_no,
                    buy_limit: value
                },resp=>{
                    if (resp.code == 1) {
                        this.getTableData();
                        this.$message({
                            type: 'success',
                            message: '操作成功'
                        });
                    } else if (resp.code == 0) {
                        this.$message({
                            type: 'warning',
                            message: resp.msg
                        });
                    }
                });
            });
        },

        /**
         * 显示/隐藏
         */
        fnChangeActive (row) {
            this.$post('/student/shop_free_self%5Cmodify',{
                goods_no: row.goods_no,
                show_status: row.show_status
            },resp=>{
                if (resp.code == 1) {
                    this.getTableData();
                    this.$message({
                        type: 'success',
                        message: '操作成功'
                    });
                } else if (resp.code == 0) {
                    this.getTableData();
                    this.$message({
                        type: 'warning',
                        message: resp.msg
                    });
                }
            });
        },

        /**
         * 数据排序
         */
        handleSortChanged(data) {
            let sortTypeMap = {
                ascending: 'asc',
                descending: 'desc'
            };

            let sortFieldMap = {
                goods_sale: 'goods_sale',
                goods_view: 'goods_view',
                create_time: 'create_time',
                goods_sort_free: 'goods_sort_free'
            };

            if (data.order) {
                this.filterData.sort_field = sortFieldMap[data.prop];
                this.filterData.sort_type = sortTypeMap[data.order];
            } else {
                this.filterData.sort_field = '';
                this.filterData.sort_type = '';
            }

            this.getTableData();
        },

        /**
         * 全选逻辑操作
         */
        fnSelect(selection) {
            if(selection.length == this.tableData.length) {
                this.checkedAll = true;
            }else{
                this.checkedAll = false;
            }
            if(selection.length > 0 && selection.length < this.tableData.length) {
                this.checkIndeterminate = true;
            }else{
                this.checkIndeterminate = false;
            }
        },
        fnSelectAllTop(selection) {
            if(selection.length > 0) {
                this.checkedAll = true;
            }else{
                this.checkedAll = false;
            }
            if(selection.length > 0 && selection.length < this.tableData.length) {
                this.checkIndeterminate = true;
            }else{
                this.checkIndeterminate = false;
            }
        },
        fnChangeChecked() {
            if(this.checkedAll){
                this.toggleSelection(1);
            }else{
                this.toggleSelection();
            }
        },
        toggleSelection(rows) {
            if (rows) {
                this.$refs.goodsZeroSelf.toggleAllSelection();
            } else {
                this.$refs.goodsZeroSelf.clearSelection();
            }
        },
        handleSelectionChange(val) {
            this.multipleSelection = val;
        },

        /**
         * 查看图片
         * @param   {String}    images      //单图预览
         * @param   {Array}     images      //多图预览
         */
        fnShowPreview(images) {
            if(images && Object.prototype.toString.call(images) == '[object String]') {
                this.$refs.preview.show([
                    images
                ]);
            } else if (images && Object.prototype.toString.call(images) == '[object Array]') {
                this.$refs.preview.show(images);
            } else {
                this.$message({
                    type: 'warning',
                    message: '图片类型错误'
                });
            }
        },

        /**
         * 过滤函数
         */
        emptyFormatter(row, column, val) {
            if (!val) return '--';
            return val;
        }
    }
};
</script>

<style lang="less" scoped>
    .container {
        background-color: #fff;
        padding: 10px 15px 5px 15px;
        display: flex;
        flex-direction: column;
        position: relative;
        width: 100%;
        .header-nav {
            position: relative;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            .header-left, .header-right {
                display: flex;
                align-items: center;
                flex-wrap: wrap;
            }
            .header-new-box {
                display: flex;
                margin-right: 15px;
                align-items: center;
                color: #606266;
                margin-bottom: 10px;
                white-space: nowrap;
                &-title {
                    margin-right: 2px;
                    white-space: nowrap;
                }
            }
        }
        /* 表单 */
        .scope-price {
            width: 50px;
            height: 50px;
        }
        /* 字体高亮 */
        .cursor-font {
            color: rgb(64, 158, 255);
            cursor: pointer;
        }
        /* 分页 */
        .pagination-wrapper {
            padding-top: 10px;
            padding-bottom: 10px;
            .el-pagination {
                float: right;
                padding: 0;
                background-color: transparent;
            }
        }
    }
    /* 排序 */
    .sort-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        white-space: nowrap;
        .sort-spliter {
            width: 1px;
            height: 12px;
            background: rgba(235, 235, 235, 1);
            margin: 0 10px;
            }
            .btn-sort {
            font-size: 14px;
            line-height: 1;
            color: #ccc;
            &:hover {
                color: #20a0ff;
            }
        }
    }
    .el-button-left {
        margin-left: 40px;
    }
    .el-button-right {
        margin-right: 10px;
    }
    .zd-flex {
        display: flex;
        align-items: center;
        flex-direction: column;
        max-height: 500px;
        overflow-y: auto;
        &-wrap {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            .zd-flex-wrap-list {
                max-width: 130px;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                .zd-flex-wrap-name {
                    font-size: 14px;
                    color: #333;
                    display: inline-block;
                }
            }
            &-money {
                color: #333;
                font-size: 14px;
                margin-left: 15px;
                margin-right: 15px;
                white-space: nowrap;
            }
        }
    }
    .zd-foot {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
</style>
<style lang="less">
    .goodsZeroSelf{
        .el-table__body-wrapper .el-table__body .el-table__row td {
            border-right: none;
        }
        .el-table__header-wrapper .el-table__header .has-gutter tr th {
            border-right: none;
        }
        .el-table .el-table_1_column_6  .cell {
            position: relative;
        }
        .el-range-editor--small .el-range-separator{
            padding: 0 1px !important;
        }
    }
</style>
